<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-6-28
 * Time: 11:25
 */

namespace backend\models\forms;


use common\services\ToolService;
use yii\base\Model;

class FinalFastTestFrom extends Model
{
    public $stop;// 间隔
    public $cacheSeconds;// 缓存
    public $firephoenix = false;// 火凤凰
    public $bigPlate = false;// 大字板
    public $star97 = false;

    public function rules()
    {
        return [
            [['stop','cacheSeconds'],'required'],
            [['stop','cacheSeconds'],'integer','min'=>0],
            [['firephoenix','bigPlate','star97'],'boolean'],
        ]; // TODO: Change the autogenerated stub
    }

    public function attributeLabels()
    {
        return [
            'stop'=>'间隔',
            'cacheSeconds'=>'缓存',
            'firephoenix'=>'火凤凰',
            'bigPlate'=>'大字板',
            'star97' => '明星97',
        ]; // TODO: Change the autogenerated stub
    }

    public function update()
    {
        $arr = $this->toArray();

        $url = \Yii::$app->params['url']."/finalRunFastTest";

        $contents = ToolService::send_post($url,$arr);

        return $contents;
    }
}